/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.psi.action.supplychainmana;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.psi.mapper.supplychainmana.StockMapper;
public class StockAction extends BaseAction
{
    @Autowired(required=false)
	private StockMapper mapper;
    /**
    库存查询
    */
    
    public Map stockQuery() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        super.listDepartments();
        
        
        SQLList<SQLMap> s_user=mapper.s_user(params);
        result.put("s_user", s_user);
        
        
        params.def("CMID7",-1);
        params.def("CMID8",-1);
        SQLList<SQLMap> s_s=mapper.s_s(params);
        SQLMap s_s_emt=s_s.getExistfirst();
        result.put("s_s", s_s_emt);
        
        
        Object CMID2 =mapper.CMID2(params);
        result.put("CMID2", CMID2);
        
        
        SQLList<SQLMap> s_person=mapper.s_person(params);
        s_person.setSelectNone("全部");
        result.put("s_person", s_person);
        
        
        SQLList<SQLMap> s_goods=mapper.s_goods(params,pagination);
        s_goods.setPagedListInfo(pagination);
        result.put("s_goods", s_goods);
        
        return result;
    }
    /**
    修改库存数量
    */
    
    public Map modifyInventory() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_goods=mapper.t_goods(params);
        SQLMap t_goods_emt=t_goods.getExistfirst();
        result.put("t_goods", t_goods_emt);
        
        return result;
    }
    /**
    预警值修改
    */
    
    public Map warningmodificationUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_waring=mapper.t_waring(params);
        SQLMap t_waring_emt=t_waring.getExistfirst();
        result.put("t_waring", t_waring_emt);
        
        return result;
    }
    /**
    库存查询备份
    */
    
    public Map mVCBEC9B88A25F4468DA83EFECB054EB123() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        Object CMID6 =mapper.CMID6(params);
        result.put("CMID6", CMID6);
        
        
        tb = createTreeBean("l_firm_treecols");
        tb.setPid(CMID6);
        SQLList<SQLMap> l_firm=mapper.l_firm(params);
        l_firm = l_firm.buildTree(tb,tb.getPid());
        result.put("l_firm", l_firm);
        
        
        params.def("CMID7",-1);
        Object CMID7 =mapper.CMID7(params);
        result.put("CMID7", CMID7);
        
        
        SQLList<SQLMap> s_user=mapper.s_user(params);
        result.put("s_user", s_user);
        
        
        params.def("CMID7",-1);
        params.def("CMID8",-1);
        SQLList<SQLMap> s_s=mapper.s_s(params);
        SQLMap s_s_emt=s_s.getExistfirst();
        result.put("s_s", s_s_emt);
        
        
        Object CMID2 =mapper.CMID2(params);
        result.put("CMID2", CMID2);
        
        
        SQLList<SQLMap> s_person=mapper.s_person(params);
        s_person.setSelectNone("全部");
        result.put("s_person", s_person);
        
        
        params.def("CMID8",-1);
        Object CMID8 =mapper.CMID8(params);
        result.put("CMID8", CMID8);
        
        
        SQLList<SQLMap> s_goods=mapper.s_goods(params,pagination);
        s_goods.setPagedListInfo(pagination);
        result.put("s_goods", s_goods);
        
        return result;
    }
    /**
    */
    
    public Map d_goods() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_goods(params);
        
        return result;
    }
    /**
    修改库存数量修改
    */
    
    public Map modifyInventorySubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.modifyInventorySubmit(params);
        
        return result;
    }
    /**
    预警值修改修改
    */
    
    public Map warningmodificationUpSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        Object cnt_warning =
        mapper.cnt_warning(params);
        result.put("cnt_warning", cnt_warning);
        
        
        mapper.warningmodificationUpSubmit(params);
        
        return result;
    }
}